<template>
	<!-- 搜索组件 -->
	<view class="cu-bar search  " :style="{backgroundColor: newData.background}"
		:class="newData.background&&newData.background.indexOf('bg-')!=-1?newData.background:''">
		<view class="search-form round"
			:style="{backgroundColor: newData.color, borderRadius: `${newData.radius}rpx`,color: `${newData.textColor}`}">
			<text class="cuIcon-search"></text>
			<navigator class="response" hover-class="none" :url="'/pages/base/search/index?activityId='+activityId">
				<view
					:style="{color: newData.textColor, 'text-align':newData.textPosition == 'center'?'center':'left',marginLeft: newData.textPosition == 'center'?'-25px':'0px'}">
					{{newData.placeholder}}
				</view>
			</navigator>
		</view>
	</view>
</template>

<script>
	let that = null
	import api from 'utils/api'
	import qqmapsdk from "@/utils/qqmap-wx-jssdk.js"
	const app = getApp();
	export default {
		name: 'basic-search',
		props: {
			value: {
				type: Object,
				default: function() {
					return {
						background: `#efeff4`,
						color: '#ffffff',
						placeholder: '请输入关键字',
						radius: 38,
						textColor: '#999999',
						textPosition: `center`,
						newData: {},
					}
				}
			},
			shopInfo:{
				type:Object,
			},
			activityId: {}
		},
		components: {},
		data() {
			return {
				theme: app.globalData.theme, //全局颜色变量
				newData: this.value,
				location: {
					address:'',
					latitude:'',
					longitude:'',
				}, //收货地址列表
				address: '', //地址
				cantonal: '', //市区联动
				shopsList: [],
			};
		},
		onLoad() {
			
		},
		mounted() {
			
		},
		methods: {
			
		}
	}
</script>

<style scoped lang="scss">
	.location {
		// width: 100rpx;
		// font-size: 20rpx;
		min-width: 100rpx;
		max-width: 300rpx;
		height: 60rpx;
		line-height: 60rpx;
		margin-left: 10rpx;

	}

	.location_text {
		color: #483c37;
		max-width: 300rpx;
		height: 100%;
		text-align: center;
		font-size: 24rpx;
		background-color: white;
		padding: 0 15rpx;
		border-radius: 45rpx;
	}
</style>
